package com.cn.goodsadmin.common;

import java.util.List;
import java.util.Map;

public class PageQueryResult<T> {
    public PageQueryResult() {
    }

    public List<T> getQueryResult() {
        return queryResult;
    }

    public void setQueryResult(List queryResult) {
        this.queryResult = queryResult;
    }

    public List<Map<String, Object>> getResultMap() {
        return resultMap;
    }

    public void setResultMap(List<Map<String, Object>> resultMap) {
        this.resultMap = resultMap;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public int getPageCount() {
        int pageCount = 0;
        if (totalCount % pageSize == 0)
            pageCount = totalCount / pageSize;
        else
            pageCount = totalCount / pageSize + 1;
        return pageCount;
    }

    public void setPageCount(int pageCount) {
        this.pageCount = pageCount;
    }

    public int getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(int pageIndex) {
        this.pageIndex = pageIndex;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    /**
     * 当前页码
     */
    private int pageIndex;
    /**
     * 一页显示的数据大小
     */
    private int pageSize;
    /**
     * 总页数
     */
    private int pageCount;
    /**
     * 总条数
     */
    private int totalCount;
    /**
     * List结果集
     */
    private List<T> queryResult;

    /**
     * Map结果集
     */
    private List<Map<String, Object>> resultMap;
}
